package com.greyshark.bledemo

import android.app.Application
import com.greyshark.lib.bluetooth.ControlCenterClient
import com.greyshark.lib.bluetooth.utils.LogUtils

class App : Application() {

  companion object {
    lateinit var app: App
  }

  override fun onCreate() {
    super.onCreate()
    app = this
    init()
  }

  private fun init() {
    ControlCenterClient.instance.initialize(
      context = app,
      initSuccess = {
        LogUtils.i("App", "ControlCenterClient initSuccess")
      },
      initFailure = { it ->
        LogUtils.i("App", "ControlCenterClient initFailure, info=${it.message}")
      }
    )
  }
}